package com.bizfty.api.apimanager.models;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Temporal;

/**
 *
 * @author johns
 */
@DiscriminatorValue("D")
public class DataTypeDate extends DataType {
    /**
     * 默认日期
     */
    @Column(name = "DEFAULT_DATE", unique = false, nullable = false, length = 7)
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date defaultDate;
    /**
     * 使用当前日期
     */
    @Column(name = "USE_NOW", unique = false, nullable = false, length = 1)
    private boolean useNow;
    /**
     * 最大日期
     */
    @Column(name = "MAX_DATE", unique = false, nullable = false, length = 7)
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date maxDate;
    /**
     * 最小日期
     */
    @Column(name = "MIN_DATE", unique = false, nullable = false, length = 7)
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date minDate;

    /**
     * 默认日期
     * @return the defaultDate
     */
    public Date getDefaultDate() {
        return defaultDate;
    }

    /**
     * 默认日期
     * @param defaultDate the defaultDate to set
     */
    public void setDefaultDate(Date defaultDate) {
        this.defaultDate = defaultDate;
    }

    /**
     * 使用当前日期
     * @return the useNow
     */
    public boolean isUseNow() {
        return useNow;
    }

    /**
     * 使用当前日期
     * @param useNow the useNow to set
     */
    public void setUseNow(boolean useNow) {
        this.useNow = useNow;
    }

    /**
     * 最大日期
     * @return the maxDate
     */
    public Date getMaxDate() {
        return maxDate;
    }

    /**
     * 最大日期
     * @param maxDate the maxDate to set
     */
    public void setMaxDate(Date maxDate) {
        this.maxDate = maxDate;
    }

    /**
     * 最小日期
     * @return the minDate
     */
    public Date getMinDate() {
        return minDate;
    }

    /**
     * 最小日期
     * @param minDate the minDate to set
     */
    public void setMinDate(Date minDate) {
        this.minDate = minDate;
    }
}
